/**
 * author: zhou
 * date: 2017.10.18
 * description: 后台系统路由入口
 * 
 */
const   Router           = require('koa-router'),
        systemRouter     = new Router(),
        menuController   = require('../controllers/manage/system/menuController'),
        schoolController = require('../controllers/manage/system/schoolController'),
        commonController = require('../controllers/commonController'),
        authGuard        = require('../utils/middlewares').authGuard;
// 菜单管理
systemRouter
    .post('/manage/menu/save', menuController.save)         // 保存菜单
    .post('/manage/menu/findOne', menuController.findOne)   // 查询菜单
    .post('/manage/menu/find', menuController.find)         // 查询菜单列表
    .post('/manage/menu/findAll', menuController.findAll)   // 查询全部菜单列表
    .post('/manage/menu/del', menuController.del)           // 删除菜单
    .post('/manage/menu/update', menuController.update);    // 更新菜单

// 学校管理
systemRouter
    .post('/manage/school/save', schoolController.save)        // 保存学校
    .post('/manage/school/findAll', schoolController.findAll)  // 查询全部学校列表
    .post('/manage/school/findOne', schoolController.findOne)  // 查询学校信息
    .post('/manage/school/update', schoolController.update)    // 更新学校信息
    .post('/manage/school/del', schoolController.del)          // 删除学校信息
    .post('/manage/school/disable', schoolController.disable); // 禁用学校

// 省市区查询
systemRouter
    .post('/common/province', commonController.getProvince)        // 获取省市区信息

module.exports = systemRouter;